.so ../bk-macros
.TH "bk chmod" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME 
bk chmod \- change the mode of a file and save it
.SH SYNOPSIS
.B bk chmod 
.[ARGc] ugoa
.Bc +
.ARG rwxs
.ARG file
.FILES
.br
.B bk chmod 
.[ARGc] ugoa
.Bc \-
.ARG rwxs
.ARG file
.FILES
.br
.B bk chmod 
.[ARGc] ugoa
.Bc =
.ARG rwxs
.ARG file
.FILES
.br
.B bk chmod 
.ARG octal
.ARG file
.FILES
.SH DESCRIPTION
.LP
The
.B chmod
command changes the stored file modes (permissions) for files in the repository.
File modes are normally whatever modes were present on the file was
when it was checked in to \*[BK].
When changes to the file mode need to be made, the
.B bk chmod
command is used to record the new modes.
.LP
The syntax is one of
.TP [\*<ugoa\*>]\-\*<rwxs\*>n
\fR[\fP\*<ugoa\*>\fR]\fB+\fI\*<rwxs\*>\fP
A symbolic way of adding permissions.
.ARG ugoa
indicates the users to which the permissions apply, a combination
of one or more of the following:
.Q u
for user,
.Q g
for group,
.Q o
for other, and
.Q a
for all.
If none are specified the default is
.QR a .  
.ARG rwxs
indicates the permission to add, a combination of one or more of the following:
.Q r
for read,
.Q w
for write,
.Q x
for execute,
.Q s
for setuid or setgid depending on
.ARG ugoa .
.tp
\fR[\fP\*<ugoa\*>\fR]\fB\-\fI\*<rwxs\*>\fP
A symbolic way of removing permissions.  As above.
.tp
\fR[\fP\*<ugoa\*>\fR]\fB=\fI\*<rwxs\*>\fP
A symbolic way of setting permissions absolutely.  As above.
.tp
.ARG octal
A 4 digit octal number wherein
.B 04000
means setuid,
.B 02000
means setgid,
and in the following three digits
.B 4
means read permission,
.B 2
means write permission, and
.B 1
means execute permission.
The last three digits are for user, group, other permissions respectively.
This form sets the mode absolutely, it is not relative to the previously
recorded mode.
.SH NOTES
Setuid and setgid are not recommended since Windows does not support that
concept.
Similarly, group/other is also unsupported on Windows.
.LP
Write permission is somewhat pointless since \*[BK] will remove write
permission if the file is checked out unlocked and add write permission
if the file is checked out with a lock.
.SH SEE ALSO
.LP
.SA log
.SH CATEGORY
.B File
